<div class="popup" style="width:400px;">
	<div class="header">
		<i class="icon_w icon_circle"></i>
		修改圈子
		<i class="icon_w icon_close" style="float:right; cursor:pointer;" onclick="UM_LAYER.close();"></i>
	</div>
	<div class="content" id="show_circle_edit">
		<{if $circle}>
			<div style="margin-bottom:10px;">
				<input class="input" type="text" id="edit_circle_title" name="edit_circle_title" style="width:200px;" value="<{$circle.title}>" maxlength="20">
			</div>
			<div style="margin-bottom:20px;">
				<input type="radio" id="edit_circle_privacy" name="edit_circle_privacy" value="public" <{if $circle.privacy === "public"}>checked<{/if}>  >公开
				<input type="radio" id="edit_circle_privacy" name="edit_circle_privacy" value="private" <{if $circle.privacy === "private"}>checked<{/if}> >私密
			</div>
			<div style="text-align:right;">
				<button class="submit" onclick="edit_circle()">修改</button>
				<button class="cancel" onclick="UM_LAYER.close();">取消</button>
			</div>
			<script type="text/javascript">
			function edit_circle () {
				var circle_title 		= $('#edit_circle_title').val();
				var circle_privacy 		= $('#edit_circle_privacy:checked').val();
				
				var result = $('#show_circle_edit');
				if (circle_title) {
					if (circle_title == '<{$circle.title}>' && circle_privacy == '<{$circle.privacy}>') {
						UM_LAYER.close();
					} else {
						result.html('操作中...');
						circle_title = encodeURIComponent(circle_title);
						loadMod('circle/action_edit', {'circle_id':'<{$circle.id}>', 'circle_title':circle_title, 'circle_privacy':circle_privacy}, '', function (msg) {
							if (msg == 'true') {
								UM_LAYER.close();
								location.href = location.href;
							} else {
								result.html('未能修改！');
							}
						} );
					}
				} else {
					alert('请填写圈子名称！');
				}
			}
			</script>
		<{else}>
			<div class="tips_big">
				只有创始人才有权限修改！
			</div>
		<{/if}>
	</div>
</div>
